home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: news.ridgecrest.ca.us!usenet
- From: mojaveg@ridgecrest.ca.us (Everett M. Greene)
- Subject: FLOOD() questions
- X-Nntp-Posting-Host: annex061
- Content-Type: text/plain; charset=iso-8859-1
- Message-ID: <19960223.7D2BD90.9087@mojaveg.ridgecrest.ca.us>
- Sender: usenet@ridgecrest.ca.us (Ridgenet Usenet admin)
- Content-Transfer-Encoding: 8bit
- Organization: none that you'd notice
- X-Newssoftware: GRn 2.1 Feb 19, 1994
- Mime-Version: 1.0
- Date: Fri, 23 Feb 1996 17:52:29 GMT
-
- I've been experimenting with the Flood() graphics operation
- and am finding much ambiguity in the RKM explanation. I've
- included an excerpt of the code I've tried (which doesn't
- work).
-
- void do_window_magic(struct Window *wp)
- {
- ULONG tmp_size;
- PLANEPTR plane;
- struct TmpRas tr;
-
- tmp_size = RASSIZE(wp->Width, wp->Height) * wp->WScreen->BitMap.Depth;
- if (plane = AllocRaster(wp->Width, wp->Height)) {
- InitTmpRas(&tr, plane, tmp_size);
- wp->RPort->TmpRas = &tr;
- Flood(wp->RPort, 1, wp->BorderLeft + 1, wp->BorderTop + 1);
- FreeRaster(plane, wp->Width, wp->Height);
- }
- }
-
- Questions:
-
- 1. How does the size computed by RASSIZE compare to that
- generated by AllocRaster() from its width and height
- parameters?
-
- 2. Does AllocRaster() allocate CHIP memory?
-
- 3. Do you have to AllocRaster() for each bit plane or will
- one allocation suffice for the whole temp raster?
-
- 4. If one is flooding within a window, does the temp raster
- need to be any larger than the window? [The RKM says
- something about making the temp raster the same size as
- the screen which would seem unnecessary.]
-
- -----------------------------------------------------------------------
- Everett M. Greene (The Mojave Greene, crotalus scutulatus scutulatus)
- Ridgecrest, Ca. 93555 Path: mojaveg@ridgecrest.ca.us
-